package com.nattakute.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.nattakute.dao.RequestDAO;
import com.nattakute.model.Request;
import com.nattakute.service.RequestService;

@Service("requestService")
@Transactional
public class RequestServicesImpl implements RequestService{

	@Autowired
	private RequestDAO requestDAO; 
	
	
	@Transactional
	public List<Request> getRequest() {
		// TODO Auto-generated method stub
		return requestDAO.getRequest();
	}

	
	@Transactional
	public Request getRequestById(Integer id) {
		// TODO Auto-generated method stub
		return requestDAO.getRequestById(id);
	}

	
	@Transactional
	public Boolean addRequest(Request request) {
		// TODO Auto-generated method stub
		return requestDAO.addRequest(request);
	}

	
	@Transactional
	public Boolean deleteRequest(Request request) {
		// TODO Auto-generated method stub
		return requestDAO.deleteRequest(request);
	}

	
	@Transactional
	public Boolean updateRequest(Request request) {
		// TODO Auto-generated method stub
		return requestDAO.updateRequest(request);
	}


	public void setRequestDAO(RequestDAO requestDAO) {
		this.requestDAO = requestDAO;
	}

	
}
